import { FC } from "react";
interface DropDownBottonProps {}
import { Dropdown, Menu, Button } from "antd";
import { DownOutlined } from "@ant-design/icons";

const menu = (
  <Menu>
    <Menu.Item key="1">第一个选项</Menu.Item>
    <Menu.Item key="2">第二个选项</Menu.Item>
    <Menu.Item key="3">第三个选项</Menu.Item>
  </Menu>
);
const DropDownBotton: FC<DropDownBottonProps> = () => {
  return (
    <div style={{ position: "relative" }}>
      <Dropdown overlay={menu} trigger={["click"]}>
        <Button
          onClick={(e) => {
            e.stopPropagation();
            console.log(e, "botton");
          }}
        >
          点击我
          <DownOutlined style={{ marginLeft: 8 }} />
        </Button>
      </Dropdown>
      {/* <div
        style={{
          position: "absolute",
          top: "4px",
          left: "15px",
          backgroundColor: "#FFFFFF",
        }}
        onClick={(e) => {
          console.log(e, "botton");
        }}
      >
        点击我
      </div> */}
    </div>
  );
};
export default DropDownBotton;
